package com.hongyue.shiJian4;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class Demo {
    public static void main(String[] args) throws ParseException {
        String a = "1990-01-01 00:00:00";
        SimpleDateFormat si = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Date pa = si.parse(a);
        System.out.println("pa = " + pa);
        String format = si.format(pa);
        System.out.println("format = " + format);
        Calendar in = Calendar.getInstance();
        Date time = in.getTime();
        System.out.println("time = " + time);
        in.setTime(pa);
    }
}
